/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package yuhuibear.poat.test.entity;

import yuhuibear.poat.annotations.action.AutoGenerateValue;
import yuhuibear.poat.annotations.relation.Field;
import yuhuibear.poat.annotations.relation.Table;
import yuhuibear.poat.object.bean.Bean;

/**
 * 
 * @author yuhuibear
 */
@SuppressWarnings("serial")




@Table(name = "personal_profiles", constrain = "")
public class PersonalProfile implements Bean {

	@AutoGenerateValue(skipOnNull = true, sqlToGet = "select currval('personal_profiles_id_seq')")
	@Field(name = "id", type = "bigserial", constrain = " primary key")
	private Long id;

	@AutoGenerateValue(skipOnNull = true, sqlToGet = "select currval('personal_profiles_idnew_one_seq')")
	@Field(name = "idnew_one", type = "bigserial", constrain = "")
	private Long i2d;

	@Field(name = "name", type = "varchar(250)", constrain = "")
	private String name;
	@Field(name = "data", type = "bytea", constrain = "")
	private byte[] data;

	@Field(name = "lid", type = "int8", constrain = "references log222s(id)")
	private Long logId;

	private String commentContent;

	@Override
	public String toString() {
		return "id = " + id + ", name = " + name + ", idnew_one = " + i2d + ", length of data = "
				+ (data == null ? null : data.length);
	}

	/**
	 * @return the id
	 */
	public Long getId() {
		return id;
	}

	/**
	 * @param id
	 *            the id to set
	 */
	public void setId(Long id) {
		this.id = id;
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name
	 *            the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @return the data
	 */
	public byte[] getData() {
		return data;
	}

	/**
	 * @param data
	 *            the data to set
	 */
	public void setData(byte[] data) {
		this.data = data;
	}

	public String getCommentContent() {
		return commentContent;
	}

	public void setCommentContent(String comment) {
		this.commentContent = comment;
	}

	public Long getI2d() {
		return i2d;
	}

	public void setI2d(Long i2d) {
		this.i2d = i2d;
	}

	public Long getLogId() {
		return this.logId;
	}

	public void setLogId(Long logId) {
		this.logId = logId;
	}

}
